{extend name='table'}


{block name="content"}

<div class="wrapper">
    <div class="layui-card">
        <!--操作提示-->
        <div class="layui-card-body">
            <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
                <div class="layui-colla-item">
                    <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
                    <div class="layui-colla-content layui-show">
                        <p>*打印面单时选择发件人，可以设置多个发件人。</p>
                    </div>
                </div>
            </div>
        </div>
        <!--列表-->
        <div class="layui-tab layui-tab-card" lay-filter="tab-all">
            <div class="layui-card-body">
                <div style="padding-bottom: 10px;" class="add">
                    <button class="layui-btn layui-btn-sm layEvent" data-modal='{:url("add")}'>
                        新增发件人
                    </button>
                </div>
                <table id="like-table-lists"  data-url="{:sysuri()}">

                </table>
                <script type="text/html" id="printer-operation">
                    <a class="layui-btn layui-btn-normal layui-btn-sm"  data-modal='{:url("edit")}?id={{d.id}}'>编辑</a>
                    <a class="layui-btn layui-btn-danger layui-btn-sm"  data-modal='{:url("del")}?id={{d.id}}'>删除</a>
                </script>
            </div>
        </div>
    </div>
</div>

<script>
     $(function () {
         $('#like-table-lists').layTable({
                 even: true, height: 'full',
                 cols: [[
                     {checkbox: true, fixed: true}
                     , {field: 'id', title: '序号', width: 100, sort: true, align: 'center'}
                     , {field: 'name', title: '发件人姓名', align: 'center'}
                     , {field: 'mobile', title: '发件人手机号', align: 'center'}
                     , {field: 'province_name', align: 'center', title: '省份'}
                     , {field: 'city_name', title: '城市', align: 'center'}
                     , {field: 'district_name', title: '区县', align: 'center'}
                     , {field: 'address', title: '地址'}
                     , {field: 'create_time', title: '添加时间', sort: true, align: 'center'}
                     , {fixed: 'right', title: '操作', align: 'center', width: "20%", toolbar: '#printer-operation'}
                 ]]
             });
     })
</script>
{/block}
